#ifndef __APP_H
#define __APP_H
#include<REG51F.H>

/***************************************************
*
***************************************************/


/***************************************************
*
***************************************************/
#define sizeFloor 		8
#define PARTS2WIN		32

#define PAUSE			0
#define UP				1
#define DOWN			2
#define LEFT			3
#define RIGHT			4
#define AHEAD			5
#define BACK			6

#define ACCIDENT		1
#define EATVICTIM		2
#define WIN				3
void initSnake();
void moveSnake();
unsigned char getNextPosition(unsigned char state);
//unsigned char splitXYZ(unsigned char xyz, unsigned char x,unsigned char y,unsigned char z);
unsigned char mergeXYZ(unsigned char x,unsigned char y,unsigned char z);
void eat(unsigned char victim);
#endif